package com.zxq.frame.modbus.inner;

import com.zxq.factory.annotate.DecoderField;
import com.zxq.factory.annotate.EncoderField;
import com.zxq.factory.annotate.Frame;
import com.zxq.factory.enums.EField;
import lombok.Data;

@Frame
@Data
public class MBAP {


    @EncoderField(sequence = 1,note = "事务标识")
    @DecoderField(sequence = 1,note = "事务标识" )
    public Integer transactionId;

    @EncoderField(sequence = 2,note = "协议标识")
    @DecoderField(sequence = 2,note = "协议标识" )
    public Integer protocolId;

    @EncoderField(sequence = 3,note = "数据长度")
    @DecoderField(sequence = 3,note = "数据长度" )
    public  Integer length;

    @EncoderField(sequence = 4,field = EField.Int,len = 1,note = "设备地址")
    @DecoderField(sequence = 4,field = EField.Int,param = 1,note = "设备地址")
    public Integer address;


}
